<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>展示判断  v-if v-show</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <h3 v-show="show">今天电脑伏笔</h3>
        <button @click="showMessage">{{show?'隐藏':'展示'}}</button>
    </div>
</body>
</html>
<script src=".//js/2.7.14_dist_vue.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            msg:"Hello",
            show:false,
        },
        methods:{
            showMessage(){
                this.show=!this.show;
            }
        },
    })
</script>